<script src="__PUBLIC__/admin/js/jquery.min.js"></script>
<script src="__PUBLIC__/admin/kindeditor-4.1.7/kindeditor-min.js"></script>
<script src="__PUBLIC__/admin/kindeditor-4.1.7/kindeditor-all-min.js"></script>
<div class="row">
	<ol class="breadcrumb">
		<li><a href="{:U('Index/index')}"><span class="glyphicon glyphicon-home"></span></a></li>
		<li class="active">公司设置</li>
	</ol>
</div><!--/.row-->

<div class="row">
	<div class="col-lg-12">
		<h1 class="page-header">公司设置</h1>
	</div>
</div><!--/.row-->
<table data-toggle="table" data-url="tables/data2.json" class="table table-hover">
    <thead>
        <tr>
            <th>公司名称</th>
            <th>时间</th>
            <th>内容</th>
            <th>上传图片</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
    <?php foreach($companylist as $k => $v) { ?>
        <tr>
            <td><?php echo $v["name"]; ?></td>
            <td><?php echo $v["time"]; ?></td>
            <td><?php echo $v["content"]; ?></td>
            <td><img style="width:60px;" src="<?php echo $v['imgurl'];?>" alt=""></td>
            <td><a href="{:U('Company/companyDel?id='.$v['Id'])}">删除</a></td>
        </tr>
    <?php } ?>
    </tbody>
</table>
<form action="{:U('Company/addCompany')}" method="post" enctype="multipart/form-data">            
    <div class="form-group">
        <label>公司设置</label>
        <input class="form-control" placeholder="请填写公司的名称" name="name" value="<?php echo $indexinfo['name']?>">
    </div>
        <textarea id="editor_id" name="content" style="width:700px;height:300px;">
        </textarea>
        <div class="form-group">
            <label>上传图片</label>
            <input type="file" name="company">
            <p class="help-block">请上传图片，（大小小于2M）</p>
        </div>    
    <button type="submit" class="btn btn-primary">提交</button>
</form>
    <script charset="utf-8" src="/editor/kindeditor.js"></script>
    <script charset="utf-8" src="/editor/lang/zh-CN.js"></script>
    <script>
        KindEditor.ready(function(K) {
                window.editor = K.create('#editor_id');
        });
    </script>